const Router = require('koa-router');
const {verifyAuth} = require('../middleware/auth.middleware');
const {create, remove, update, getFriendById, list} = require("../controller/friend.controller");

const friendRouter = new Router({prefix: "/friend"});

// 创建一个朋友
friendRouter.post("/", verifyAuth, create);
// 删除一个朋友
friendRouter.delete("/", verifyAuth, remove);
// 修改一个朋友
friendRouter.patch("/", verifyAuth, update);
// 获取好友详情
friendRouter.get("/", verifyAuth, getFriendById);
// 获取朋友列表
friendRouter.get("/list", list);

module.exports = friendRouter;
